# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  
@software: PyCharm 
@file: drawColorSpiral.py 
@time: 2018/8/10 16:27
"""
'''
利用turtle绘制彩色螺旋线
'''
import turtle as t

t.hideturtle()
t.pensize(2)
t.bgcolor('black')
colors = ['red', 'purple', 'blue', 'green']
t.tracer(False) #关闭屏幕刷新
for x in range(1000):
    t.fd(2*x)
    t.color(colors[x % 4])
    t.lt(91)
t.tracer(True) #打开屏幕刷新
t.done()


